<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>商品管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../component/elementUI/index.css">
    <link rel="stylesheet" href="../../../style/wangeditor.css">
    <link rel="stylesheet" href="../../../style/index.css">
    <style>
        .custom-tree-node {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 14px;
            padding-right: 8px;
        }

        .custom-tree-node .config {
            padding: 10px 0 10px 8px;
            /* border-left: 1px solid #EBEEF5; */
        }

        .el-tree-node__content {
            padding: 10px 0 10px;
            /* border-bottom: 1px solid #EBEEF5; */
        }

        .el-dialog__header {
            padding: 15px 15px 10px;
        }

        .el-dialog__body {
            padding: 15px;
        }

        .el-dialog__footer {
            padding: 5px 15px 10px;
        }

        .cont-scroll-wrap {
            border: 1px solid #EBEEF5;
            flex: auto;
            height: 0;
            overflow-y: auto;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak class="minWidth">
        <el-form :inline="true" :form="form">
            <el-form-item>
                <el-dropdown trigger="click" @command="handleBatchAdd">
                    <el-button type="primary">
                        批量配置<i class="el-icon-arrow-down el-icon--right"></i>
                    </el-button>
                    <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item command="1">批量选品</el-dropdown-item>
                        <el-dropdown-item command="0">批量取消</el-dropdown-item>
                    </el-dropdown-menu>
                </el-dropdown>
            </el-form-item>
            <el-form-item>
                <el-input v-model.trim="form.Article_Name" clearable placeholder="请输入商品名称"/>
            </el-form-item>
            <el-form-item>
                <el-select clearable v-model.trim="form.Brand_SerialNumber" placeholder="请选择商品品牌" filterable style="width: 100%">
                    <el-option v-for="(item,index) in brand" :key="index" :label="item.Brand_Name" :value="item.Brand_SerialNumber"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item>
                <el-select v-model.trim="form.Row_Status" placeholder="类型" filterable style="width: 100%">
                    <el-option v-for="(item,index) in Status" :key="index" :label="item.label" :value="item.value"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onSerach">查询</el-button>
            </el-form-item>
        </el-form>
        <el-table :data="tableData" stripe border height="calc(100vh - 140px)" style="width: 100%"  @selection-change="handleSelectionChange">
            <el-table-column align="center" type="selection" width="40"></el-table-column>
            <el-table-column align="center" type="index" label="序号" width="50"></el-table-column>
            <el-table-column align="center" prop="Supplier_Article_SerialNumber" show-overflow-tooltip  min-width="140" label="供应商品内码"></el-table-column>
            <el-table-column align="center" prop="Article_Name" min-width="140" show-overflow-tooltip label="商品名称"></el-table-column>
            <el-table-column align="center" prop="Specifications_Name" min-width="140" show-overflow-tooltip label="规格名称"></el-table-column>
            <el-table-column align="center" prop="Picture_URL" width="140" align="center" label="商品封面">
                <template v-slot="{row}">
                    <el-image fit="contain" :src="BASE_IMG + row.Picture_URL" :preview-src-list="[BASE_IMG + row.Picture_URL]" style="width:100px;height: 100px;border-radius: 5px;"></el-image>
                </template>
            </el-table-column>
            <el-table-column align="center" prop="Supplier_Name"  min-width="100" show-overflow-tooltip label="供应商"></el-table-column>
            <el-table-column align="center" prop="Brand_Name"  min-width="100" show-overflow-tooltip label="品牌"></el-table-column>
            <el-table-column align="center" prop="Sales_Unit_Price"  min-width="120" show-overflow-tooltip label="今日销售单价"></el-table-column>
            <el-table-column align="center" prop="Purchase_Unit_Price"  min-width="120" show-overflow-tooltip label="今日采购单价"></el-table-column>
            <el-table-column align="center" prop="Stock_Remain"  min-width="120" show-overflow-tooltip label="今日库存剩余"></el-table-column>
            <el-table-column align="center" label="是否游客可见" min-width="120">
                <template v-slot="{row}">
                    {{row.Row_Status=='0'?'是':'否'}}
                </template>
            </el-table-column>                                                                                                                  
            <el-table-column align="center" label="操作" width="90">
                <template v-slot="{row}">
                    <el-button :type="row.Row_Status=='0'?'danger':'success'" size="small" @click="handleAdd(row)">
                        {{row.Row_Status=='0'?'取消':'选品'}}
                    </el-button>
                </template>
            </el-table-column>
        </el-table>
        <el-pagination style="margin-top: 5px;" background @size-change="handleSizeChange"
            @current-change="handleCurrentChange" :current-page="form.page" :page-sizes="[10, 20, 30, 50]"
            :page-size="form.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
        </el-pagination>
    </div>
    <script type="text/javascript" src="../../../utils/wangeditor.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.min.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../utils/vue.min.js"></script>
    <script type="text/javascript" src="../../../utils/vuex.min.js"></script>
    <script type="text/javascript" src="../../../component/elementUI/index.js"></script>
    <script type="text/javascript" src="../../../component/component.js"></script>
    <script type="text/javascript" src="../../../utils/FileSaver.min.js"></script>
    <script type="text/javascript" src="../../../utils/FileSaver.js"></script>
    <script type="text/javascript" src="../../../utils/xlsx.full.min.js"></script>
    <script type="text/javascript" src="../../../utils/xlsx.core.min.js"></script>
    <script type="text/javascript" src="../../../config/config.js"></script>
    <script type="text/javascript" src="../../../utils/compressor.js"></script>
    <script type="text/javascript" src="../../../utils/ID_Validity.js"></script>
    <script type="text/javascript" src="../../../utils/utils.js"></script>
    <script type="text/javascript" src="js/index.js"></script>
</body>

</html>